package cn.laixueit.exception;

import cn.laixueit.result.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyException {


    @ExceptionHandler(RuntimeException.class)
    public Result ex(Exception e){
        e.printStackTrace();
        return new Result(400,"不好意思，系统出现错误，请重试或联系管理员"+e.getMessage());
    }
}
